#ifndef Log_H_
#define Log_H_


#if 0

#ifndef YUNOS_LOG
#define YUNOS_LOG(priority, tag, ...)                                                              \
      (YUNOS_LOG_LEVEL > kLogPriority##priority                                                      \
                      ? 0                                                                            \
                      : yunosLogPrint(kLogIdMain, kLogPriority##priority, tag, __VA_ARGS__))
#endif

#ifndef LogV
#define LogV(...) ((void)YUNOS_LOG(Verbose, LOG_TAG, __VA_ARGS__))
#endif

#endif

#define LOG_T  0 
#define LOG_D  1 
#define LOG_I  2 
#define LOG_W  3 
#define LOG_E  4 
#define LOG_F  5
#define LOG_OFF  6

#define _LOG_LEVEL LOG_D
#define LOG_LEVEL (_LOG_LEVEL & 0xF)


#define LOG(priority, tag, func, line,  ...)   \
      (LOG_LEVEL > priority ? 0: LogPrint(priority, tag, func, line, __VA_ARGS__))


#define LogD(...) ((void)LOG(LOG_D, LOG_TAG, __func__, __LINE__, __VA_ARGS__))

int LogPrint(int prio, const char* tag, const char *func, const int line, const char* fmt, ...);
int LogSetLevel(int prio);

#endif


